package com.geektime.hello;

import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @Author: DRevelation
 * @Date: 2021/1/15 15:55
 */
public class CopyPropertiesDemo {

    public static void main(String[] args) {
        Person p = new Person();
        p.setName("person");
        p.setAge(11);
        User user = new User();
        BeanUtils.copyProperties(p, user);
        user.setName("user");
        System.out.println("user = " + user);

        System.out.println(1 << 6);
        double d = Double.parseDouble("0") * (1000000);
        System.out.println((int) d);
    }
}

@Data
class Person {
    private String name;
    private int age;
}

@Data
class User {
    private String name;
    private int age;
    private int sex;
}